#ifndef FRIEND_H
#define FRIEND_H
#include <QObject>
#include <vector>
#include "fileinformation.h"
class Friend : public QObject
{
    Q_OBJECT
public:
    explicit Friend(QObject *parent = nullptr);

public:
    //属性
    QString networkName; //好友网名
    QString accountNumber; //好友账号
    int icon; //好友头像
    QString remarks; //备注
    bool state; //状态

    //聊天记录信息
    std::vector<QString> textMessages; //文字聊天储存
    std::vector<FileInformation> fileInformation; //存储文件信息

public:
    //接口
    void updateState(); //更新好友状态，每次调用都会将数据库中的状态赋值给state

public:
    //运算符重载
    bool operator==(Friend& f); //判断好友是否相等
};


#endif // FRIEND_H
